package java0107;

import java.util.Map;
import java.util.TreeMap;

public class Java6 {
    public static void main(String[] args) {

        Map<Integer,String> map = new TreeMap<Integer,String>();
        map.put(1,"1");
        map.put(2,"2");
        map.put(3,"3");
        map.forEach((k,v)->{
            System.out.println(k + "\t" + v);
        });

        Map<Integer,Double> map1 = new TreeMap<Integer,Double>();
        map1.put(1,1.0);
        map1.put(2,2.0);
        map1.put(3,3.0);
        map.forEach((k,v)->{
            System.out.println(k + "\t" + v);
        });

        Map<String,Double> map2 = new TreeMap<String,Double>();
        map2.put("1",1.0);
        map2.put("2",2.0);
        map2.put("3",3.0);
        map.forEach((k,v)->{
            System.out.println(k + "\t" + v);
        });


    }
}
